package model

type ArticleCateListInput struct {
	ParentId string `json:"parent_id" in:"query" v:"integer|min:0" dc:"父类id"`
}

type ArticleCateItem struct {
	Id         uint64 `json:"id"`
	ParentId   uint64 `json:"parent_id" dc:"父级分类ID"`
	CateName   string `json:"cate_name" dc:"分类名称"`
	CateSlug   string `json:"cate_slug" dc:"分类别名"`
	CateSort   uint   `json:"cate_sort" dc:"排序"`
	CateStatus uint   `json:"cate_status" dc:"分类状态：0-禁用、1-正常"`
}

type ArticleCateTreeItem struct {
	ArticleCateItem
	CateLevel uint                   `json:"cate_level" dc:"关系树等级"`
	Children  []*ArticleCateTreeItem `json:"children"`
}

type ArticleCateFormInput struct {
	ParentId   uint64 `json:"parent_id" v:"integer|min:0" dc:"父级分类ID"`
	CateName   string `json:"cate_name" v:"required|max-length:30" dc:"分类名称"`
	CateSlug   string `json:"cate_slug" v:"max-length:30" dc:"分类别名"`
	CateSort   uint   `json:"cate_sort" v:"integer|between:0,1000" dc:"排序"`
	CateStatus uint   `json:"cate_status" v:"integer|in:0,1" dc:"分类状态：0-禁用、1-正常"`
}
